package com.yaoxuguang.concurrence.threadBase.interrupted;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.threadBase.interrupted
 * @Description: 测试用异常的方式停止线程
 * @date 2018年12月17日15:26
 */
public class UseExceptionInterrupteThreadRun {
    public static void main(String[] args) {
        try {
            UseExceptionInterrupteThread thread = new UseExceptionInterrupteThread();
            thread.start();
            Thread.sleep(500);
            thread.interrupt();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("end...");
    }
}
